From: Adel Gadllah Date: Sun, 4 Nov 2012 10:53:22 +0000 (+0100) Subject: polKitAgent: Don't crash when we cannot enable/disable the auth agent X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4749 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dd6fe584754785f591e1c1733c71d7f362ab3690;p=gnome-shell.git polKitAgent: Don't crash when we cannot enable/disable the auth agent This makes it easier to run with jhbuild. https://bugzilla.gnome.org/show_bug.cgi?id=687556 --- diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index d38dcdff4..929b43e69 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -335,11 +335,19 @@ const AuthenticationAgent = new Lang.Class({ }, enable: function() { - this._native.register(); + try { + this._native.register(); + } catch(e) { + log('Failed to register AuthenticationAgent'); + } }, disable: function() { - this._native.unregister(); + try { + this._native.unregister(); + } catch(e) { + log('Failed to unregister AuthenticationAgent'); + } }, _onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {